package com.fruits;

public class Apple extends Fruits {

    final int single_price=8;

    @Override
    public double totalMoney(int num) {
        //这里可以给提示或者抛异常，或者在测试时进行判断抛异常,其他位置斤数处理类似即可
        if (num>=0){
            return single_price*num;
        }else {
            return 0;
        }

    }

    @Override
    public double dis_totalMoney(int num) {
        //todo
        return single_price*num;
    }
}
